package ebj.common.generic;

/**
 * 
 * <p>功能说明:泛型类示例--SingleTuple</p>
 * @author zhoushineyoung@hotmail.com
 * @time 2016年9月23日 上午10:58:27
 * @param <T>
 */
public class GenericType<T> {
	T member;
	public GenericType(T member) {
		this.member = member;
	}
	
	public T getMemberT() {
		return member;
	}
	
	void showTpye() {
		System.err.println("Type of T is [" + this.member.getClass() + "].");
	}
}

class Client {
	public static void main(String[] args) {
		GenericType<Integer> genericType01 = new GenericType<Integer>(66);
		genericType01.showTpye();
		System.out.println(genericType01.getMemberT());
		
		GenericType<String> genericType02 = new GenericType<String>("你好");
		genericType02.showTpye();
		System.out.println(genericType02.getMemberT());
	}
}
